package com.yang.booking.controller;

import com.yang.booking.service.StaffRestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class StaffRestController {

    @Autowired
    private StaffRestService staffRestService;

    @PostMapping("/provider/staffRest/createStaffRest")
    public Map<String, Object> createStaffRest(@RequestParam(name = "staffId") String staffId,
                                                 @RequestParam(name = "RestDate") String RestDate,
                                                 @RequestParam(name = "RestTime") String RestTime
    ){
        return staffRestService.createStaffRest(staffId, RestDate, RestTime);
    }

    @PostMapping("/provider/staffRest/deleteStaffRest")
    public Map<String, Object> deleteStaffRest(@RequestParam(name = "storeId") String storeId,
                                               @RequestParam(name = "RestDate") String RestDate,
                                               @RequestParam(name = "RestDate") String RestTime
    ){
        return staffRestService.deleteStaffRest(storeId, RestDate, RestTime);
    }
}
